package com.example.tnot.Teacher.CoursePart.CourseInternal.ClassDetail.Adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.example.tnot.Teacher.CoursePart.CourseInternal.ClassDetail.VpFragment.ClassDetailInternalFragment;

public class vpClassDetailAdapter extends FragmentStateAdapter {
    public final String[] tabs = {"任务", "章节", "更多"};

    public vpClassDetailAdapter(@NonNull FragmentActivity fragmentActivity) {
        super(fragmentActivity);
    }

    @NonNull
    @Override
    public Fragment createFragment(int position) {
        return ClassDetailInternalFragment.newInstance(tabs[position]);
    }

    @Override
    public int getItemCount() {
        return tabs.length;
    }
}
